<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.9.0">
    

    

    



    <meta charset="utf-8">
    
    
    <meta name="sogou_site_verification" content="true">
    
    
    
    <title>Lvshen&#39;s Blog | This is My World</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content>
    <meta name="baidu-site-verification" content="VIVNdSiMZm">
    <meta name="description" content="学如逆水行舟，不进则退">
<meta property="og:type" content="website">
<meta property="og:title" content="Lvshen&#39;s Blog">
<meta property="og:url" content="https://lvshen9.gitee.io/index.html">
<meta property="og:site_name" content="Lvshen&#39;s Blog">
<meta property="og:description" content="学如逆水行舟，不进则退">
<meta property="og:locale" content="zh-CN">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Lvshen&#39;s Blog">
<meta name="twitter:description" content="学如逆水行舟，不进则退">
    
    <link rel="shortcut icon" href="/img/mylogo.jpg">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@latest/css/style.css">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu"  >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/img/brand.jpg)">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/avatar.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">我的技术小房间</h5>
          <a href="mailto:https://lvshen9.github.io" title="https://lvshen9.github.io" class="mail">https://lvshen9.github.io</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect active">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                Archives
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                Tags
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/categories"  >
                <i class="icon icon-lg icon-th-list"></i>
                Categories
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/about"  >
                <i class="icon icon-lg icon-address-book"></i>
                About
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/collection"  >
                <i class="icon icon-lg icon-apple"></i>
                Collection
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://lvshen9.github.io/" target="_blank" >
                <i class="icon icon-lg icon-wordpress"></i>
                Blog
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/lvshen9" target="_blank" >
                <i class="icon icon-lg icon-github-alt"></i>
                GitHub
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">Lvshen&#39;s Blog</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header index-header">

    <div class="container fade-scale">
        <h1 class="title">Lvshen&#39;s Blog</h1>
        <h5 class="subtitle">
            
                This is My World
            
        </h5>
    </div>

    


</header>

<div class="container body-wrap">

    <ul class="post-list">
    
        <li class="post-list-item fade">
            <article id="post-1"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2020-07-04 20:39:47" datetime="2020-07-04T12:39:47.000Z"  itemprop="datePublished">2020-07-04</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/技术/">技术</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2020/07/04/1/">用MyBatis generator逆向生成定制化实体类</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <p>市面上有很多逆向生成实体类的插件，<code>Mybatis</code>本身有也有逆向生成实体的插件，但是比较通用，不符合个人业务需求，于是来定制一个插件。简单好用，只需要运行工程里面的<code>Main</code>类即可生成代码。不多说，来看效果：</p>
<h4 id="效果"><a href="#效果" class="headerlink" title="效果"></a>效果</h4><p>项目目录：</p>
    

        <a href="/2020/07/04/1/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Java/">Java</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Mybatis/">Mybatis</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/实体类/">实体类</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-1"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2020-07-01 20:55:52" datetime="2020-07-01T12:55:52.000Z"  itemprop="datePublished">2020-07-01</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/技术/">技术</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2020/07/01/1/">后端开发面试分享</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <p>前段时间面试了几家公司，现在把面试经历写出来。和大家一起分享。为了隐私，面试公司打码。</p>
<figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="https://s1.ax1x.com/2020/07/01/NHpkz4.md.jpg" alt="面试" title>
                </div>
                <div class="image-caption">面试</div>
            </figure>
    

        <a href="/2020/07/01/1/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Java/">Java</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/后端/">后端</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/面试/">面试</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-1"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2020-05-24 13:42:35" datetime="2020-05-24T05:42:35.000Z"  itemprop="datePublished">2020-05-24</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/技术/">技术</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2020/05/24/1/">我在github上的Java项目</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <blockquote>
<p>github地址：<a href="https://github.com/lvshen9/demo" target="_blank" rel="noopener">Lvshen项目-Demo[Java技术栈]</a></p>
</blockquote>
<h4 id="模块一：自定义注解com-lvshen-demo-annotation"><a href="#模块一：自定义注解com-lvshen-demo-annotation" class="headerlink" title="模块一：自定义注解com.lvshen.demo.annotation"></a>模块一：自定义注解<code>com.lvshen.demo.annotation</code></h4><h5 id="注解定义"><a href="#注解定义" class="headerlink" title="注解定义"></a>注解定义</h5><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">@Retention</span>(RetentionPolicy.RUNTIME)</span><br><span class="line"><span class="meta">@Target</span>(ElementType.FIELD)</span><br><span class="line"><span class="keyword">public</span> <span class="meta">@interface</span> NeedSetValue &#123;</span><br><span class="line">    Class&lt;?&gt; beanClass();</span><br><span class="line">    <span class="function">String <span class="title">param</span><span class="params">()</span></span>;</span><br><span class="line">    <span class="function">String <span class="title">method</span><span class="params">()</span></span>;</span><br><span class="line">    <span class="function">String <span class="title">targetFiled</span><span class="params">()</span></span>;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
    

        <a href="/2020/05/24/1/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Java/">Java</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/github/">github</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-1"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2020-05-07 08:02:35" datetime="2020-05-07T00:02:35.000Z"  itemprop="datePublished">2020-05-07</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/技术/">技术</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2020/05/07/1/">BIO与NIO与多路复用</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <h4 id="什么是IO"><a href="#什么是IO" class="headerlink" title="什么是IO"></a>什么是IO</h4><p>首先需要了解下什么是IO，IO就是读入/写出数据的过程，和等待读入/写出数据的过程。</p>
<p>举个列子，应用程序想要将数据写到操作系统磁盘文件中，是需要将数据从用户空间拷贝到操作系统内核空间，再由内核空间将数据写入到磁盘中。读取也是一样，都需要经过内核空间。这里主要将网络的IO。</p>
<figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="https://s1.ax1x.com/2020/05/07/YZmepT.png" alt="系统调用" title>
                </div>
                <div class="image-caption">系统调用</div>
            </figure>
    

        <a href="/2020/05/07/1/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/IO/">IO</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/多路复用/">多路复用</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-1"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2020-04-28 19:23:31" datetime="2020-04-28T11:23:31.000Z"  itemprop="datePublished">2020-04-28</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/技术/">技术</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2020/04/28/1/">腾讯云算法面试题-给定边界输出对应索引下标</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <h4 id="题目"><a href="#题目" class="headerlink" title="题目"></a>题目</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">给出有序数组(非递减)和闭区间, 找出数组中在区间之内的元素起始位置和结束位置</span><br><span class="line">* 输入：</span><br><span class="line">* 1. 有序数组[1,1,2,3,4,5,5]</span><br><span class="line">* 2. 闭区间[-3,3]</span><br><span class="line">* 输出：[0,3]</span><br><span class="line">* 解释：在数组中，前4个元素在区间之内，则起始位置为0，结束位置为3</span><br><span class="line">* 要求：最坏情况时间复杂度小于O(n)</span><br></pre></td></tr></table></figure>
    

        <a href="/2020/04/28/1/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/有序数组/">有序数组</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/面试题/">面试题</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-1"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2020-04-27 17:55:18" datetime="2020-04-27T09:55:18.000Z"  itemprop="datePublished">2020-04-27</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/技术/">技术</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2020/04/27/1/">阿里多线程面试题-按线程顺序输出</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <h4 id="题目"><a href="#题目" class="headerlink" title="题目"></a>题目</h4><p>之前参加阿里的面试，其中有道笔试题，当时没有做出，面试之后做出来了。题目如下：</p>
<blockquote>
<p>评测题目: 三个线程A、B、C，实现一个程序让线程A打印“A”，线程B打印“B”，线程C打印“C”，三个线程输出ABCABCABC……ABC，循环10次“ABC”。限时30分钟。</p>
</blockquote>
<h4 id="代码"><a href="#代码" class="headerlink" title="代码"></a>代码</h4><p>下面是我后面写的代码：</p>
    

        <a href="/2020/04/27/1/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/多线程/">多线程</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/面试题/">面试题</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-1"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2020-04-25 19:45:35" datetime="2020-04-25T11:45:35.000Z"  itemprop="datePublished">2020-04-25</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/技术/">技术</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2020/04/25/1/">用Redis实现接口限流</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <h4 id="为什么需要限流"><a href="#为什么需要限流" class="headerlink" title="为什么需要限流"></a>为什么需要限流</h4><p>在高并发环境下，为了缓解数据库，服务器的压力，往往需要对一些接口进行限制操作。比如某个接口<code>10s</code>内只能调用<code>5</code>次，需要怎么做呢？</p>
<p>这里我有一个思路，利用<code>Redis</code>的<code>incr</code>命令，每次调用接口，原子自增 <code>+1</code>，当自增的值大于设定的次数时，就不让调用接口（返回接口调用次数已经用完之类的）。</p>
<h4 id="Lua脚本"><a href="#Lua脚本" class="headerlink" title="Lua脚本"></a>Lua脚本</h4><p><code>Lua</code>脚本的多个命令操作可以实现原子性，下面为相关的<code>Lua</code>脚本命令。</p>
    

        <a href="/2020/04/25/1/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Redis/">Redis</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/限流/">限流</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-1"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2020-04-23 17:52:41" datetime="2020-04-23T09:52:41.000Z"  itemprop="datePublished">2020-04-23</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/技术/">技术</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2020/04/23/1/">Redis实现延迟队列</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <h4 id="什么时延迟队列"><a href="#什么时延迟队列" class="headerlink" title="什么时延迟队列"></a>什么时延迟队列</h4><p>所谓的延迟队列就是，生产者的消息推送到队列中，消费者不会马上消费，而是到了设置的指定的时间才消费。可以采用Redis的zset来实现。将消息序列化成一个字符串作为zset的value。这个消息的到期处理时间作为score，然后用一个线程去轮询zset到期的任务处理，建议使用多线程，为了保障任务消费的可用性。不过多线程就要考虑并发抢任务。</p>
<p>废话不多说直接上代码。</p>
    

        <a href="/2020/04/23/1/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Redis/">Redis</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/延迟队列/">延迟队列</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-1"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2020-04-22 20:21:27" datetime="2020-04-22T12:21:27.000Z"  itemprop="datePublished">2020-04-22</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/技术/">技术</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2020/04/22/1/">Redis分布式可重入锁实现</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <h4 id="什么是可重入锁"><a href="#什么是可重入锁" class="headerlink" title="什么是可重入锁"></a>什么是可重入锁</h4><p>一个线程可以多次获取该锁，说明这把锁是可重入的。下面我们来实现<code>Redis</code>分布式可重入锁。我们可以用线程的<code>ThreadLocal</code>变量存储当前持有锁的计数</p>
<h4 id="核心代码"><a href="#核心代码" class="headerlink" title="核心代码"></a>核心代码</h4><p>下面的代码并不完善，只是提供了一个思路。</p>
    

        <a href="/2020/04/22/1/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/分布式/">分布式</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/可重入锁/">可重入锁</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-1"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2020-04-19 22:49:52" datetime="2020-04-19T14:49:52.000Z"  itemprop="datePublished">2020-04-19</time>

        
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/技术/">技术</a></li></ul>



    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2020/04/19/1/">手写Zookeeper分布式锁</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <h4 id="为什么要用Zookeeper做分布式锁？"><a href="#为什么要用Zookeeper做分布式锁？" class="headerlink" title="为什么要用Zookeeper做分布式锁？"></a>为什么要用Zookeeper做分布式锁？</h4><p>在说Zookeeper做分布式锁之前，我们知道Redis也可以做分布式锁。那我为什么要用Zookeeper做分布式锁呢？</p>
<figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="https://s1.ax1x.com/2020/04/20/JQiOMt.png" alt title>
                </div>
                <div class="image-caption"></div>
            </figure>
<p>上图为数据库，Redis，Zookeeper实现分布式锁的技术对比。不用说，数据库实现分布式锁的性能肯定很低，Redis虽然性能很高，但是最终一致性上确是输于Zookeeper。Zookeeper在分布式集群上有天然优势。在生产环境中，中间件一般以集群形式不是，那么这里涉及到主从同步问题，Redis主从集群中，如果Master节点在向Slave节点发送RDB文件同步时，有可能Master节点挂掉，文件里面的数据有可能会有一秒的丢失。然而Redis有一套同步确认的策略。用Redis上锁实际是Redis里面setnx 数据，一般需要主节点同步数据给从节点成功了，才能认为成功。当然为了提升效率，有一个RedLock模型，该模型认为只要同步节点成功数超过半数就认为上锁成功。然而这个RedLock模型算法维护起来相当麻烦。但是Zookeeper天然支持这个模型。</p>
    

        <a href="/2020/04/19/1/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Zookeeper/">Zookeeper</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/分布式锁/">分布式锁</a></li></ul>

    </div>
    
</article>

        </li>
    
    </ul>

    
<nav id="page-nav">
    <div class="inner">
    <span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><a class="page-number" href="/page/3/">3</a><span class="space">&hellip;</span><a class="page-number" href="/page/10/">10</a><a class="extend next" rel="next" href="/page/2/">下一页</a>
    </div>
</nav>


</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            
            <span>博客内容遵循 <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">知识共享 署名 - 非商业性 - 相同方式共享 4.0 国际协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p><span>我的技术小房间 &copy; 2015 - 2020</span>
            <span>
                
                Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a>
            </span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=https://lvshen9.gitee.io/&title=Lvshen's Blog&pic=https://lvshen9.gitee.io/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=https://lvshen9.gitee.io/&title=Lvshen's Blog&source=学如逆水行舟，不进则退" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://lvshen9.gitee.io/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=Lvshen's Blog&url=https://lvshen9.gitee.io/&via=https://lvshen9.gitee.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=https://lvshen9.gitee.io/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=https://lvshen9.gitee.io/" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: false };


</script>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/main.min.js"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/search.min.js" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>



<script>
(function() {
    var OriginTitile = document.title, titleTime;
    document.addEventListener('visibilitychange', function() {
        if (document.hidden) {
            document.title = '死鬼去哪里了！';
            clearTimeout(titleTime);
        } else {
            document.title = '(つェ⊂)咦!又好了!';
            titleTime = setTimeout(function() {
                document.title = OriginTitile;
            },2000);
        }
    });
})();
</script>



</body>
</html>
